The present invention relates to a precursor composition, a photosensitive resin composition, a method for producing a precursor composition, a cured film, a method for producing a cured film, and a semiconductor device. In particular, the present invention relates to a precursor composition including a heterocycle-containing polymer precursor selected from a polyimide precursor and a polybenzoxazole precursor, and the like.